<template>
	<view>

		<view class="layout">
			<view class="viewbox" style="background-color: #fff;"></view>
			<cu-custom :isBack="true">
				<block slot="content">合作反馈</block>
			</cu-custom>

			<view class="group1">
				<view class="top">
					<input type="text" placeholder="反馈标题" />
				</view>

				<view class="bottom">
					<input type="text" placeholder="请输入反馈内容" @change="modifyDescription" />
				</view>
			</view>

			<button class="btn" @click="submitDescription">提交</button>

		</view>
	</view>
</template>
<script setup>
import request from '@/common/request.js';
import api from '../../common/apiService';


import {
	loadingType
} from '@/utils/type';
import { ref, onMounted } from 'vue'

const { feedback } = api;


const description = ref('');
const modifyDescription = (e) => {
	description.value = e.target.value;
}
const submitDescription = () => {

	const uid = uni.getStorageSync('uid');
	feedback(uid, description.value).then(data => {
		uni.showToast({
			title: '提交成功',
			icon: 'none'
		});
	}).catch(e => {
		uni.showToast({
			title: e.msg || '请求失败，请稍后再试',
			icon: 'none'
		});
	})
}
onMounted(() => {

});

</script>

<style lang="scss" scoped>
.layout {
	background: #f5f5f5;

	.group1 {
		width: 750rpx;
		height: 550rpx;
		background: #ffffff;
		margin: 24rpx 0 0 0;

		.top {
			margin-top: 40rpx;
			width: 680rpx;
			height: 100rpx;
			// border: 1px solid red;
			margin: 0 35rpx 0 35rpx;

			input {
				width: 680rpx;
				height: 100rpx;
				line-height: 100rpx;
				background: #f5f5f5;
				padding-left: 21rpx;
				box-sizing: border-box;
			}
		}

		.bottom {
			width: 680rpx;
			height: 348rpx;
			// border: 1px solid red;
			margin: 18rpx 35rpx 0 35rpx;

			input {
				width: 680rpx;
				height: 348rpx;
				background: #f5f5f5;
				box-sizing: border-box;
				padding: 200rpx 0 0 24rpx;
			}
		}
	}

	.btn {
		width: 680rpx;

		color: #ffffff;
		margin-top: 20rpx;
		background-color: #18288f;
		border-radius: 45rpx;
		margin-top: 90rpx;
	}

}
</style>